import {
	http
} from '@/uni_modules/uview-plus'

/**
 * @function 获取服务全部数据
 */
export const workAll = (data) => http.post('/work/all', data);

/**
 * @function 获取服务详情
 * @param id 详情id
 */
export const workDetail = (data) => http.post('/work/detail', data);

/**
 * @function 新增地址
 */
export const addressAdd = (data) => http.post('/user/address/add', data);

/**
 * @function 获取所有地址
 */
export const getAddressAll = (data) => http.post('/user/address/all', data);

/**
 * @function 删除地址
 * @param id 地址id
 */
export const postAddressDel = (data) => http.post('/user/address/del', data);

/**
 * @function 更新地址
 * @param id 地址id
 */
export const postAddressUpdate = (data) => http.post('/user/address/update', data);

/**
 * @function 获取地址详情
 * @param id 地址id
 */
export const addressDetail = (data) => http.post('/user/address/detail', data);

/**
 * @function 获取用户信息
 */
export const getBaseInfo = (data) => http.post('/user/baseInfo', data);

/**
 * @function 修改密码
 */
export const updateLoginSecret = (data) => http.post('/user/updateLoginSecret', data);

/**
 * @function 获取用户优惠券
 */
export const getUserCouponAll = (data) => http.post('/user/userCoupon/all', data);

/**
 * @function 获取用户钱包
 */
export const balanceDetail = (data) => http.post('/user/balance/detail', data);

/**
 * @function 消费记录
 */
export const balanceLog = (data) => http.post('/user/balanceLog/pageList', data);

/**
 * @function 批量获取工人信息及其工种信息
 */
export const multiSkill = (data) => http.post('/work/worker/multiSkill', data);

/**
 * @function 获取工人
 */
export const pageListNearby = (data) => http.post('/work/worker/pageListNearby', data);

/**
 * @function 获取工人信息
 */
export const workerInfo = (data) => http.post('/work/worker/detail', data);

/**
 * @function 获取工人信息
 */
export const orderMultiCreate = (data) => http.post('/order/serviceOrder/multiCreate', data);

/**
 * @function 加入购物车
 */
export const serviceCartSave = (data) => http.post('/shoppingCart/serviceCart/save', data);

/**
 * @function 获取所有购物车
 */
export const serviceCartAll = (data) => http.post('/shoppingCart/serviceCart/all', data);

/**
 * @function 移除购物车
 */
export const serviceCartDel = (data) => http.post('/shoppingCart/serviceCart/del', data);

/**
 * @function 获取所有订单列表
 */
export const orderList = (data) => http.post('/order/pageList', data);

/**
 * @function 生成支付信息
 */
export const payServiceOrder = (data) => http.post('/pay/payServiceOrder', data);

/**
 * @function 余额支付扣款
 */
export const userBalancePayConfirm = (data) => http.post('/pay/userBalancePayConfirm', data);

/**
 * @function 订单提交数据校验
 */
export const orderPreview = (data) => http.post('/order/serviceOrder/preview', data);

/**
 * @function 获取订单详情
 */
export const orderInfo = (data) => http.post('/order/detail', data);

/**
 * @function 退款验证
 */
export const refundPreview = (data) => http.post('/refund/preview', data);

/**
 * @function 退款验证
 */
export const refundAdd = (data) => http.post('/refund/add', data);


/**
 * @function 评价
 */
export const orderEvaluate = (data) => http.post('/order/serviceOrder/evaluate', data);

/**
 * @function 修改上门时间
 * @order_no 订单号
 * @new_plan_begin_at 新上门时间
 */
export const changePlanBeginAt = (data) => http.post('/order/changePlanBeginAt', data);

/**
 * @function 获取动态
 * @order_no 订单号
 * @new_plan_begin_at 新上门时间
 */
export const orderTrends = (data) => http.post('/order/serviceOrderAffairs/all', data);

/**
 * @function 发布动态
 * @order_no 订单号
 * @content 内容
 * @pics 图片
 */
export const orderTrendsAdd = (data) => http.post('/order/serviceOrderAffairs/add', data);

/**
 * @function 获取工人的某些工种
 * @worker_id 工人id
 */
export const workerMultiSkill = (data) => http.post('/work/worker/multiSkill', data);











